package com.haiya.factory.absfactory.pizza.store;

import com.haiya.factory.absfactory.pizza.product.BjCheesePizza;
import com.haiya.factory.absfactory.pizza.product.BjGreekPizz;
import com.haiya.factory.absfactory.pizza.product.Pizza;

public class BjFactory implements AbstractFactory {
    @Override
    public Pizza makePizza(String orderType) {
        System.out.println("使用抽象工厂");
        Pizza pizza = null;

        if (orderType.equals("cheese")) {
            pizza = new BjCheesePizza();
        } else if (orderType.equals("greek")) {
            pizza = new BjGreekPizz();
        }
        return pizza;
    }
}
